////////////////////////////////////////////////////////////////////////////////
//  Copyright 2011 Adam Kidd
//  
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//  
//    http://www.apache.org/licenses/LICENSE-2.0
//  
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
////////////////////////////////////////////////////////////////////////////////

package com.arcadefoundry.rest.http
{
	import com.arcadefoundry.rest.http.HTTPRequestMethod;

	public class HTTPRequestMethod
	{
		//------------------------------------------------
		//
		// Properties
		//
		//------------------------------------------------
		/**
		 * Constants for the http verbs that are currently implemented.
		 */
		public static const GET:String 		= "GET";
		public static const POST:String 	= "POST";
		public static const PUT:String 		= "PUT";
		public static const DELETE:String 	= "DELETE";
		
		//------------------------------------------------
		//
		// Methods
		//
		//------------------------------------------------
		/**
		 * Checks if the passed in verb is valid and supported.
		 *  
		 * @param method The HTTP Verb to validate
		 * @return True if valid and supported in the current version.
		 * 
		 */
		public static function isValidMethod(method:String):Boolean
		{
			if (method == GET || method == POST || method == PUT || method == DELETE)
			{
				return true;
			}
			return false;
		}
	}
}
